package kr.hkit.androidcomplete01.ch08;

import kr.hkit.androidcomplete01.ch08.HandleEvent.MyView;
import android.app.Activity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Toast;

public class HandleEvent5  extends Activity{
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		View vw = new View(this);
		vw.setOnTouchListener(TouchListener);
		setContentView(vw);
	}
	
	View.OnTouchListener TouchListener = new View.OnTouchListener() {
		
		@Override
		public boolean onTouch(View v, MotionEvent event) {
			if (event.getAction() == MotionEvent.ACTION_DOWN) {
				Toast.makeText(HandleEvent5.this, "This Event Received5",
						Toast.LENGTH_SHORT).show();
				return true;
			}
			return false;
		}
	};
}
